{"ast":null,"code":"import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\nimport Alert from '.';\nvar ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n  _inherits(ErrorBoundary, _React$Component);\n  var _super = _createSuper(ErrorBoundary);\n  function ErrorBoundary() {\n    var _this;\n    _classCallCheck(this, ErrorBoundary);\n    _this = _super.apply(this, arguments);\n    _this.state = {\n      error: undefined,\n      info: {\n        componentStack: ''\n      }\n    };\n    return _this;\n  }\n  _createClass(ErrorBoundary, [{\n    key: \"componentDidCatch\",\n    value: function componentDidCatch(error, info) {\n      this.setState({\n        error: error,\n        info: info\n      });\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this$props = this.props,\n        message = _this$props.message,\n        description = _this$props.description,\n        children = _this$props.children;\n      var _this$state = this.state,\n        error = _this$state.error,\n        info = _this$state.info;\n      var componentStack = info && info.componentStack ? info.componentStack : null;\n      var errorMessage = typeof message === 'undefined' ? (error || '').toString() : message;\n      var errorDescription = typeof description === 'undefined' ? componentStack : description;\n      if (error) {\n        return /*#__PURE__*/React.createElement(Alert, {\n          type: \"error\",\n          message: errorMessage,\n          description: /*#__PURE__*/React.createElement(\"pre\", null, errorDescription)\n        });\n      }\n      return children;\n    }\n  }]);\n  return ErrorBoundary;\n}(React.Component);\nexport default ErrorBoundary;","map":{"version":3,"names":["_classCallCheck","_createClass","_inherits","_createSuper","React","Alert","ErrorBoundary","_React$Component","_super","_this","apply","arguments","state","error","undefined","info","componentStack","key","value","componentDidCatch","setState","render","props","message","description","children","errorMessage","toString","errorDescription","createElement","type","Component"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/alert/ErrorBoundary.js"],"sourcesContent":["import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\nimport Alert from '.';\nlet ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n  _inherits(ErrorBoundary, _React$Component);\n  var _super = _createSuper(ErrorBoundary);\n  function ErrorBoundary() {\n    var _this;\n    _classCallCheck(this, ErrorBoundary);\n    _this = _super.apply(this, arguments);\n    _this.state = {\n      error: undefined,\n      info: {\n        componentStack: ''\n      }\n    };\n    return _this;\n  }\n  _createClass(ErrorBoundary, [{\n    key: \"componentDidCatch\",\n    value: function componentDidCatch(error, info) {\n      this.setState({\n        error,\n        info\n      });\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      const {\n        message,\n        description,\n        children\n      } = this.props;\n      const {\n        error,\n        info\n      } = this.state;\n      const componentStack = info && info.componentStack ? info.componentStack : null;\n      const errorMessage = typeof message === 'undefined' ? (error || '').toString() : message;\n      const errorDescription = typeof description === 'undefined' ? componentStack : description;\n      if (error) {\n        return /*#__PURE__*/React.createElement(Alert, {\n          type: \"error\",\n          message: errorMessage,\n          description: /*#__PURE__*/React.createElement(\"pre\", null, errorDescription)\n        });\n      }\n      return children;\n    }\n  }]);\n  return ErrorBoundary;\n}(React.Component);\nexport default ErrorBoundary;"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,KAAK,MAAM,GAAG;AACrB,IAAIC,aAAa,GAAG,aAAa,UAAUC,gBAAgB,EAAE;EAC3DL,SAAS,CAACI,aAAa,EAAEC,gBAAgB,CAAC;EAC1C,IAAIC,MAAM,GAAGL,YAAY,CAACG,aAAa,CAAC;EACxC,SAASA,aAAa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